#!/usr/bin/python
import tree,sys

print "usage: ",sys.argv[0],"inputfile outputfile"

fi=file(sys.argv[1],'r')
fo=file(sys.argv[2],'w')
lines=fi.readlines()
for l in lines:
  t = tree.Tree(l.strip())
  t.parse()
  fo.write(t.toSentence()+"\n")

fi.close()
fo.close()

